//
//  BlukViewController.m
//  界面切换使用storyboard
//
//  Created by wukeng on 16/2/22.
//  Copyright © 2016年 wukeng. All rights reserved.
//

#import "BlukViewController.h"
#import "SummaryViewController.h"
extern int count;

@interface BlukViewController ()
@property (weak, nonatomic) IBOutlet UITextField *height;

@property (weak, nonatomic) IBOutlet UITextField *width;

@property (weak, nonatomic) IBOutlet UITextField *length;

@property (weak, nonatomic) IBOutlet UITextField *rectangleBluk;
@property (weak, nonatomic) IBOutlet UITextField *radius;
@property (weak, nonatomic) IBOutlet UITextField *circleBluk;
@property (weak,nonatomic)SummaryViewController *summaryVC;

@end

@implementation BlukViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
}
- (IBAction)didClickBtn {
    float recBluk = [self.length.text floatValue] * [self.width.text floatValue] * [self.height.text floatValue];
    [self.rectangleBluk setText:[NSString stringWithFormat:@"%.1f",recBluk]];
    float cirBluk = (4/3)*M_PI*[self.radius.text floatValue]*[self.radius.text floatValue]*[self.radius.text floatValue];
    [self.circleBluk setText:[NSString stringWithFormat:@"%.1f",cirBluk]];
    count++;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
